{include file="public/head"}
<style type="text/css" media="all">
    .text{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

</style>
<body>

<header class="aui-header-default aui-header-fixed aui-header-bg">
    <a href="javascript:history.back(-1)" class="aui-header-item">
        <i class="aui-icon aui-icon-back-white"></i>
    </a>
    <div class="aui-header-center aui-header-center-clear">
        <div class="aui-header-center-logo">
            <div class="aui-car-white-Typeface" style="color:black;font-weight: bold;">秒杀商品</div>
        </div>
    </div>
    <a href="#" class="aui-header-item-icon"   style="min-width:0">
    </a>
</header>
<div class="aui-content-box">
    <div class="aui-banner-content aui-fixed-top" data-aui-slider>
        <div class="aui-banner-wrapper">
            {volist name="BannerList" id="v"}
            <div class="aui-banner-wrapper-item">
                <a href="{$v.dizhi}">
                    <img src="{$v.url}">
                </a>
            </div>
            {/volist}
        </div>
        <div class="aui-banner-pagination"></div>
    </div>
    <div class="aui-dri"></div>
    <section class="aui-list-product">
        <div class="aui-list-product-box">
            {volist name="GoodsList" key="k" id="gv"}
            <a href="{:url('Goods/GoodsDetail',array('goods_id'=>$gv.id))}" class="aui-list-product-item text" style="max-height:250px">
                <div class="aui-list-product-item-img">
                    <img src="{$gv.logo_url}" alt="">
                </div>
                <div class="aui-list-product-item-text">
                    <h3>{$gv.name}</h3>
                    <div class="aui-list-product-mes-box">
                        <div>
							<span class="aui-list-product-item-price">
								<em>¥</em>
								{$gv.price}
							</span>
                        </div>
                    </div>
                    <div class="aui-list-product-mes-box">
                        <div>
							{if condition="$gv.mnum elt $gv.sellnum && $gv.goods_type eq 4"}
							<span class="aui-list-product-item-price" style="color:gray;font-size:12px">	已抢完</span>
							{elseif condition="$gv.etime elt $nowtime && $gv.goods_type eq 4"}
							<span class="aui-list-product-item-price" style="color:gray;font-size:12px">已结束</span>
							{elseif condition="$gv.btime egt $nowtime && $gv.goods_type eq 4"}
							<span class="aui-list-product-item-price" style="color:gray;font-size:12px">	未开始</span>
							{else/}
							<span class="aui-list-product-item-price a{$k}"  id="times{$k}" style="font-size:12px"></span>
							<span class="aui-list-product-item-price" style="display:none;color:gray;font-size:12px" id="b{$k}">已结束</span>
							{/if}
                        </div>
<script>
function _fresh()
{
//  var endtime=new Date("2021-04-17T00:00:00");
  var endtime="{$gv['time']}";
 var nowtime = new Date();
 nowtime = nowtime.getTime()/1000;
 
 var leftsecond=parseInt(endtime-nowtime);
// alert(endtime.getTime()); return false;
 let d=parseInt(leftsecond/3600/24);
 __h=parseInt((leftsecond/3600)%24);
 __m=parseInt((leftsecond/60)%60);
 __s=parseInt(leftsecond%60);
var c=new Date();
var q=((c.getMilliseconds())%10);
 document.getElementById("times{$k}").innerHTML=d+"天 "+__h+"小时"+__m+"分"+__s+"秒";
 if(leftsecond<=0){
 // document.getElementById("times").innerHTML="抢购已结束";
 clearInterval(sh);
 $('.a{$k}').css('display','none');
 $('#b{$k}').css('display','block');
 }
}
_fresh();
var sh;
sh=setInterval(_fresh,100);

</script>
                    </div>
                </div>
            </a>
            {/volist}

        </div>
    </section>
</div>

<footer class="aui-footer-default aui-footer-fixed">
    <a href="{:url('Index/Index')}" class="aui-footer-item">
        <span class="aui-footer-item-icon aui-icon aui-footer-icon-home"></span>
        <span class="aui-footer-item-text">首页</span>
    </a>
    <a href="{:url('index/index')}" class="aui-footer-item aui-footer-active">
        <span class="aui-footer-item-icon aui-icon aui-footer-icon-car"></span>
        <span class="aui-footer-item-text">商城</span>
    </a>
<!--    <a href="{:url('Goods/ClassList')}" class="aui-footer-item">-->
<!--        <span class="aui-footer-item-icon aui-icon aui-footer-icon-class"></span>-->
<!--        <span class="aui-footer-item-text">分类</span>-->
<!--    </a>-->
    <!--    <a href="{:url('Order/OrderList')}" class="aui-footer-item">-->
    <!--        <span class="aui-footer-item-icon aui-icon aui-footer-icon-car"></span>-->
    <!--        <span class="aui-footer-item-text">订单</span>-->
    <!--    </a>-->
    <a href="{:url('User/Index')}" class="aui-footer-item">
        <span class="aui-footer-item-icon aui-icon aui-footer-icon-me"></span>
        <span class="aui-footer-item-text">我的</span>
    </a>
</footer>
<script type="text/javascript" src="__STATIC__/User/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/User/js/aui.js"></script>
<script>
</script>
</body>
</html>